using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Customer: BusinessObjectBase
	{

		#region InnerClass
		public enum CustomerFields
		{
			CustomerID,
			FirstName,
			LastName,
			CellPhone,
			Gender,
			Birthday,
			Addrress,
			District,
			City,
			Phone,
			Company,
			Email,
			User,
			Deleted
		}
		#endregion

		#region Data Members

			int _customerID;
			string _firstName;
			string _lastName;
			string _cellPhone;
			bool? _gender;
			DateTime? _birthday;
			string _addrress;
			string _district;
			string _city;
			string _phone;
			string _company;
			string _email;
			string _user;
			bool _deleted;

		#endregion

		#region Properties

		public int  CustomerID
		{
			 get { return _customerID; }
			 set
			 {
				 if (_customerID != value)
				 {
					_customerID = value;
					 PropertyHasChanged("CustomerID");
				 }
			 }
		}

		public string  FirstName
		{
			 get { return _firstName; }
			 set
			 {
				 if (_firstName != value)
				 {
					_firstName = value;
					 PropertyHasChanged("FirstName");
				 }
			 }
		}

		public string  LastName
		{
			 get { return _lastName; }
			 set
			 {
				 if (_lastName != value)
				 {
					_lastName = value;
					 PropertyHasChanged("LastName");
				 }
			 }
		}

		public string  CellPhone
		{
			 get { return _cellPhone; }
			 set
			 {
				 if (_cellPhone != value)
				 {
					_cellPhone = value;
					 PropertyHasChanged("CellPhone");
				 }
			 }
		}

		public bool?  Gender
		{
			 get { return _gender; }
			 set
			 {
				 if (_gender != value)
				 {
					_gender = value;
					 PropertyHasChanged("Gender");
				 }
			 }
		}

		public DateTime?  Birthday
		{
			 get { return _birthday; }
			 set
			 {
				 if (_birthday != value)
				 {
					_birthday = value;
					 PropertyHasChanged("Birthday");
				 }
			 }
		}

		public string  Addrress
		{
			 get { return _addrress; }
			 set
			 {
				 if (_addrress != value)
				 {
					_addrress = value;
					 PropertyHasChanged("Addrress");
				 }
			 }
		}

		public string  District
		{
			 get { return _district; }
			 set
			 {
				 if (_district != value)
				 {
					_district = value;
					 PropertyHasChanged("District");
				 }
			 }
		}

		public string  City
		{
			 get { return _city; }
			 set
			 {
				 if (_city != value)
				 {
					_city = value;
					 PropertyHasChanged("City");
				 }
			 }
		}

		public string  Phone
		{
			 get { return _phone; }
			 set
			 {
				 if (_phone != value)
				 {
					_phone = value;
					 PropertyHasChanged("Phone");
				 }
			 }
		}

		public string  Company
		{
			 get { return _company; }
			 set
			 {
				 if (_company != value)
				 {
					_company = value;
					 PropertyHasChanged("Company");
				 }
			 }
		}

		public string  Email
		{
			 get { return _email; }
			 set
			 {
				 if (_email != value)
				 {
					_email = value;
					 PropertyHasChanged("Email");
				 }
			 }
		}

		public string  User
		{
			 get { return _user; }
			 set
			 {
				 if (_user != value)
				 {
					_user = value;
					 PropertyHasChanged("User");
				 }
			 }
		}

		public bool  Deleted
		{
			 get { return _deleted; }
			 set
			 {
				 if (_deleted != value)
				 {
					_deleted = value;
					 PropertyHasChanged("Deleted");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("CustomerID", "CustomerID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("FirstName", "FirstName",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("LastName", "LastName",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("CellPhone", "CellPhone",20));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Addrress", "Addrress",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("District", "District",20));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("City", "City",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Phone", "Phone",20));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Company", "Company",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Email", "Email",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("User", "User",50));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Deleted", "Deleted"));
		}

		#endregion

	}
}
